        package com.example.administrator.yunniuusedcar;

        import android.content.Intent;
        import android.os.Bundle;
        import android.support.v7.app.AppCompatActivity;

        public class SplashActivity extends AppCompatActivity {

            @Override
            protected void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);

//                //取消标题栏
//                requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
//                //取消状态栏
//                getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
                setContentView(R.layout.activity_splash);

                StartAnimation();
            }

            private void StartAnimation() {
                //引导页睡3秒
                new Thread(new Runnable() {
                    @Override
                    public void run() {
                        try {
                            Thread.sleep(2500); //持续 秒

                        startActivity(new Intent(SplashActivity.this, MainActivity.class));
                        finish();  //注销SplashActivity

                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                    }
                }).start();
            }
        }
